package com.zhz.common.tool.mybatisplus.base.dal.repository;


import com.zhz.common.tool.mybatisplus.base.core.contract.BaseParam;
import com.zhz.common.tool.mybatisplus.base.core.contract.Page;
import com.zhz.common.tool.mybatisplus.base.core.contract.PageParam;
import com.zhz.common.tool.mybatisplus.base.core.contract.SortParam;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

public interface BaseRepository<D, Q extends BaseParam> {
    boolean save(D d);

    boolean save(Collection<D> list);

    boolean update(D d);

    boolean update(Collection<D> list);

    boolean delete(Serializable var1);

    boolean delete(Collection<? extends Serializable> var1);

    List<D> list(Collection<? extends Serializable> list);

    List<D> list(Q param);

    D first(Q param);

    D getOne(Q param);

    D get(Serializable id);

    int count(Q param);

    Page<D> page(PageParam<Q> param);

    Page<D> page(long var1, long var3, Q var5);

    Page<D> page(long var1, long var3, Q var5, List<SortParam> var6);

    Page<D> page(long var1, long var3, Q var5, List<SortParam> var6, boolean var7);

    boolean deleteByKey(String key);

    boolean deleteByKeys(Collection<String> keys);

    boolean updateByKey(D d);

    boolean updateByKey(Collection<D> list);

    D getByKey(String key);

    List<D> listByKey(Collection<String> keys);
}
